#include <iostream>
#include <list>

using namespace std;

int cmp(int &d)
{
        return d == 44;
}

int main()
{
        int arr[] = {11,22,33,44,55,66,77,88,99};
        list<int> ls;

        for (int i = 0; i < sizeof(arr) / sizeof(*arr); i++) {
                //ls.push_back(arr[i]);
                ls.push_front(arr[i]);
        }

        for (list<int>::iterator it = ls.begin(); it != ls.end(); it++) {
                cout << *it << ' ';
        }
        cout << endl;

        //ls.remove(66);
        ls.remove_if(cmp);
        for (list<int>::iterator it = ls.begin(); it != ls.end(); it++) {
                cout << *it << ' ';
        }
        cout << endl;

        return 0;
}
